package com.ruoyi.core.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.core.mapper.ShippingAddressesMapper;
import com.ruoyi.core.domain.ShippingAddresses;
import com.ruoyi.core.service.IShippingAddressesService;

/**
 * 用户收货地址Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-07
 */
@Service
public class ShippingAddressesServiceImpl implements IShippingAddressesService 
{
    @Autowired
    private ShippingAddressesMapper shippingAddressesMapper;

    /**
     * 查询用户收货地址
     * 
     * @param id 用户收货地址主键
     * @return 用户收货地址
     */
    @Override
    public ShippingAddresses selectShippingAddressesById(Long id)
    {
        return shippingAddressesMapper.selectShippingAddressesById(id);
    }

    /**
     * 查询用户收货地址列表
     * 
     * @param shippingAddresses 用户收货地址
     * @return 用户收货地址
     */
    @Override
    public List<ShippingAddresses> selectShippingAddressesList(ShippingAddresses shippingAddresses)
    {
        return shippingAddressesMapper.selectShippingAddressesList(shippingAddresses);
    }

    /**
     * 新增用户收货地址
     * 
     * @param shippingAddresses 用户收货地址
     * @return 结果
     */
    @Override
    public int insertShippingAddresses(ShippingAddresses shippingAddresses)
    {
        return shippingAddressesMapper.insertShippingAddresses(shippingAddresses);
    }

    /**
     * 修改用户收货地址
     * 
     * @param shippingAddresses 用户收货地址
     * @return 结果
     */
    @Override
    public int updateShippingAddresses(ShippingAddresses shippingAddresses)
    {
        return shippingAddressesMapper.updateShippingAddresses(shippingAddresses);
    }

    /**
     * 批量删除用户收货地址
     * 
     * @param ids 需要删除的用户收货地址主键
     * @return 结果
     */
    @Override
    public int deleteShippingAddressesByIds(Long[] ids)
    {
        return shippingAddressesMapper.deleteShippingAddressesByIds(ids);
    }

    /**
     * 删除用户收货地址信息
     * 
     * @param id 用户收货地址主键
     * @return 结果
     */
    @Override
    public int deleteShippingAddressesById(Long id)
    {
        return shippingAddressesMapper.deleteShippingAddressesById(id);
    }
}
